﻿using Gecko;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WebIm
{
    public partial class Form1 : Form
    {
        private readonly string xulrunnerPath = Application.StartupPath + "/xulrunner";
          private const string testUrl = "http://chat.weiliao99.cn";  
          private GeckoWebBrowser Browser;
        public Form1()
        {
            InitializeComponent();
            try
            {
                Xpcom.Initialize(xulrunnerPath);
            }
            catch
            {

            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

           try
            {
                Browser = new GeckoWebBrowser();
                Browser.Parent = this;
                Browser.Dock = DockStyle.Fill;
                
                Browser.Navigate("http://chat.weiliao99.cn",GeckoLoadFlags.ReplaceHistory|GeckoLoadFlags.BypassCache);
            }
            catch
            {

            }
        }
    }
}
